#!/bin/bash

mkdir /usr/java
cd /usr/java
wget http://47.114.163.161:8087/java/jdk/jdk-8u212-linux-x64.tar.gz
tar -zxf jdk-8u212-linux-x64.tar.gz
chown -R root:root jdk1.8.0_212/
chown -R root:root jdk1.8.0_212/*
echo 'JAVA_HOME=/usr/java/jdk1.8.0_212' >> /etc/profile
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile
source /etc/profile
